<template>
	<view>
		<view class="wrap">
      <view class="uni-flex uni-column">
        <view class="flex-item flex-item-V uni-bg-red publicity" style="font-size: 17px;">
          {{publicity.title}}
        </view>
        <view class="flex-item flex-item-V uni-bg-green publicity" >
          <view class="u-demo-block__content">
            <u-row
                justify="space-between"
                gutter="10"
            >
              <u-col span="5">
                <view class="demo-layout bg-purple" style="color: #2b85e4">
                  {{publicity.createdName|ellipsis}}
                </view>
              </u-col>
              <u-col span="5">
                <view class="demo-layout bg-purple-light">
                  {{publicity.createTime}}
                </view>
              </u-col>
            </u-row>
          </view>
        </view>
        <view class="flex-item flex-item-V uni-bg-green publicity">
<!--          <u&#45;&#45;image  src="publicity.image" width="80px" height="80px"></u&#45;&#45;image>-->
          <image :src="publicity.image"  mode="aspectFill"></image>
<!--          <u-album :urls="urls1" keyName="src2"></u-album>-->
        </view>
        <view class="flex-item flex-item-V uni-bg-green publicity">
          {{publicity.content}}
        </view>
      </view>

    </view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				orderList: [],
        publicityId: '',
        publicity:{},
        urls1: [{
          src2: 'https://cdn.uviewui.com/uview/album/1.jpg',
        }]
			};
		},
		onLoad(source) {
      console.log('接收的参数', source)
      this.publicityId = source.id
      this.publicityDetail()
		},
		computed: {

		},
		methods: {

      publicityDetail(){
        this.$u.get('/new/new/publicity/' + this.publicityId).then(res => {
          this.publicity = res.data;
          // this.publicity.urls = [{src2:this.publicity.image}]
          // console.log(this.publicity)
        })
      }

		}
	};
</script>

<style>
	/* #ifndef H5 */
	page {
		height: 100%;
		background-color: #f2f2f2;
	}

	/* #endif */
</style>

<style lang="scss" scoped>

  .publicity{
    margin-top: 15rpx;
    margin-left: 20rpx;
    margin-right: 20rpx
  }
	.order {
		width: 710rpx;
		background-color: #ffffff;
		margin: 20rpx auto;
		border-radius: 20rpx;
		box-sizing: border-box;
		padding: 20rpx;
		font-size: 28rpx;

		.top {
			display: flex;
			justify-content: space-between;

			.left {
				display: flex;
				align-items: center;

				.store {
					margin: 0 10rpx;
					font-size: 32rpx;
					font-weight: bold;
				}
			}

			.right {
				color: $u-type-warning-dark;
			}
		}

		.item {
			display: flex;
			margin: 20rpx 0 0;

			.left {
				margin-right: 20rpx;

				image {
					width: 200rpx;
					height: 200rpx;
					border-radius: 10rpx;
				}
			}

			.content {
				.title {
					font-size: 28rpx;
					line-height: 50rpx;
				}

				.type {
					margin: 10rpx 0;
					font-size: 24rpx;
					color: $u-tips-color;
				}

				.delivery-time {
					margin-top: 100rpx;
					font-size: 24rpx;
				}
			}

			.right {
				margin-left: 10rpx;
				padding-top: 20rpx;
				text-align: right;

				.decimal {
					font-size: 24rpx;
					margin-top: 4rpx;
				}

				.number {
					color: $u-tips-color;
					font-size: 24rpx;
				}
			}
		}

		.total {
			margin-top: 20rpx;
			text-align: right;
			font-size: 24rpx;

			.total-price {
				font-size: 32rpx;
			}
		}

		.bottom {
			display: flex;
			margin-top: 40rpx;
			padding: 0 10rpx;
			justify-content: space-between;
			align-items: center;

			.btn {
				line-height: 52rpx;
				width: 160rpx;
				border-radius: 26rpx;
				border: 2rpx solid $u-border-color;
				font-size: 26rpx;
				text-align: center;
				color: $u-type-info-dark;
			}

			.evaluate {
				color: $u-type-warning-dark;
				border-color: $u-type-warning-dark;
			}
		}
	}

	.centre {
		text-align: center;
		margin: 200rpx auto;
		font-size: 32rpx;

		image {
			width: 164rpx;
			height: 164rpx;
			border-radius: 50%;
			margin-bottom: 20rpx;
		}

		.tips {
			font-size: 24rpx;
			color: #999999;
			margin-top: 20rpx;
		}

		.btn {
			margin: 80rpx auto;
			width: 200rpx;
			border-radius: 32rpx;
			line-height: 64rpx;
			color: #ffffff;
			font-size: 26rpx;
			background-image: linear-gradient(270deg, rgba(249, 116, 90, 1) 0%, rgba(255, 158, 1, 1) 100%);
		}
	}

	.wrap {
		display: flex;
		flex-direction: column;
		height: calc(100vh - var(--window-top));
		width: 100%;
	}

	.swiper-box {
		flex: 1;
	}

	.swiper-item {
		height: 100%;
	}
</style>
